//
//  QCWKWebViewDelegate.h
//  KDFDApp
//
//  Created by haoran on 17/4/28.
//  Copyright © 2017年 cailiang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>

typedef NS_ENUM(NSInteger,WKWebViewVCLoadStatus) {
    WKWebVCDidLoad = 0,
    WKWebViewVisible = 1
};

@interface FQBaseWKWebViewNavigation : NSObject<WKNavigationDelegate,WKUIDelegate>

@property (nonatomic) WKWebViewVCLoadStatus status;
/**
 WKWebView 已经开始加载 回调block
 */
@property (nonatomic, copy) void (^didStartLoadWithRequest)(WKWebView *webView,WKNavigation *navigation);

@property (nonatomic, copy) void (^didReceiveServerRedirect)(WKWebView *webView,WKNavigation *navigation);

@property (nonatomic, copy) void (^didCommitNavigation)(WKWebView *webView,WKNavigation *navigation);

/**
 接收到后台返回的回调
 */
@property (nonatomic, copy) void (^decidePolicyForNavigationResponse)(WKWebView *webView,WKNavigationResponse *response);
/**
 //  根据WebView对于即将跳转的HTTP请求头信息和相关信息来决定是否跳转
 */
@property (nonatomic, copy) void (^decidePolicyForNavigationActionBlock)(WKWebView *webView,WKNavigationAction *navigationAction);
/**
 WKWebView 已经加载完毕 回调block
 */
@property (nonatomic, copy) void (^afterLoadFinish)(WKWebView *webView);
/**
 WKWebView 加载失败 回调block
 */
@property (nonatomic, copy) void (^afterLoadFaild)(WKWebView *webView,NSError *error);
@end
